package com.example.materialviewpagerdemo.view;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import com.example.materialviewpagerdemo.R;
import com.zyao89.view.zloading.ZLoadingDialog;

public class Time extends AppCompatActivity {

    TextView datatime;

    private ZLoadingDialog dialog;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.time_layout);
        //getCurrentData();
        datatime=findViewById(R.id.datatime);
        Intent intent = getIntent();
        datatime.setText(intent.getStringExtra("datatime"));
    }


   /* private void getCurrentData() {
        Retrofit retrofit = new Retrofit.Builder().baseUrl(StaticData.url)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
        CurrentDataController currentDataController = retrofit.create(CurrentDataController.class);
        Call<CurrentData> currentDataCall = currentDataController.queryOne();
        currentDataCall.enqueue(new Callback<CurrentData>() {
            @Override
            public void onResponse(Call<CurrentData> call, Response<CurrentData> response) {
                datatime.setText(response.body().getDataTime().substring(0,19));
            }

            @Override
            public void onFailure(Call<CurrentData> call, Throwable t) {
                dialog.cancel();
                System.out.println("连接超时");
            }
        });
    }*/

}
